//
//  ProductCollectionViewCell.m
//  NBProduct
//
//  Created by ping on 15/11/3.
//  Copyright (c) 2015年 ping. All rights reserved.
//

#import "ProductCollectionViewCell.h"


@implementation ProductCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    
    return self;
}

-(void)initView{
    self.backgroundColor = FenLeiBeiJingHuiSe;
    _myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5 * _kscW, 5 * _kscH, self.width - 10 * _kscW, self.height - 50 * _kscH)];
    _myImageView.layer.cornerRadius = 3;
    _myImageView.contentMode = UIViewContentModeScaleAspectFill;
    _myImageView.clipsToBounds = YES;
    [self.contentView addSubview:_myImageView];
    
  

    
   _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(_myImageView.left, _myImageView.bottom, _myImageView.width, 20 * _kscH)];
    _nameLabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:_nameLabel];

    _jiaGeLabel = [[UILabel alloc]initWithFrame:CGRectMake(_nameLabel.left, _nameLabel.bottom, _nameLabel.width/2, 20 * _kscH)];
    
    _jiaGeLabel.textColor = [UIColor redColor];
    _jiaGeLabel.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:_jiaGeLabel];
    
    
    _yuanJiaGeLabel = [[UILabel alloc]initWithFrame:CGRectMake(_jiaGeLabel.right + 3, _jiaGeLabel.top, _nameLabel.width/2, _jiaGeLabel.height)];
    _yuanJiaGeLabel.textColor = [UIColor lightGrayColor];
    _yuanJiaGeLabel.font = [UIFont systemFontOfSize:13];
    
    [self.contentView addSubview:_yuanJiaGeLabel];
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
